﻿using System.ComponentModel;

namespace CNGIDemo
{
    public class ChartItem : INotifyPropertyChanged
    {
        public ChartItem(int t, int v)
        {
            time = t;
            myVar = v;
        }

        private int time;

        public int Time
        {
            get { return time; }
            set
            {
                time = value;
                OnPropertyChanged("Time");
            }
        }

        private int myVar;

        public int Value
        {
            get { return myVar; }
            set
            {
                myVar = value;
                OnPropertyChanged("Value");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
